<div  th:fragment="top">
   <head>
	   	<meta charset="UTF-8">
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
   </head>
   <div class="logo"><a href="/index.shtml">CRM v1.0</a></div>
   <div class="left_open">
       <i title="展开左侧栏" class="iconfont">&#xe699;</i>
   </div>
   <ul class="layui-nav left fast-add" lay-filter="">
     <li class="layui-nav-item">
       <a href="javascript:;">+新增</a>
       <dl class="layui-nav-child"> <!-- 二级菜单 -->
         <dd><a onclick="x_admin_show('资讯','http://www.baidu.com')"><i class="iconfont">&#xe6a2;</i>资讯</a></dd>
         <dd><a onclick="x_admin_show('图片','http://www.baidu.com')"><i class="iconfont">&#xe6a8;</i>图片</a></dd>
          <dd><a onclick="x_admin_show('用户','http://www.baidu.com')"><i class="iconfont">&#xe6b8;</i>用户</a></dd>
       </dl>
     </li>
   </ul>
   <ul class="layui-nav right" lay-filter="">
     <li class="layui-nav-item">
       <a href="javascript:;" th:text="${session.loginUser.nickName}"></a>
       <dl class="layui-nav-child"> <!-- 二级菜单 -->
         <dd><a onclick="x_admin_show('个人信息','http://www.baidu.com')">个人信息</a></dd>
         <dd><a onclick="x_admin_show('切换帐号','http://www.baidu.com')">切换帐号</a></dd>
         <dd><a href="#" id="btn_logout">退出</a></dd>
       </dl>
     </li>
     <li class="layui-nav-item to-index"><a href="/index.shtml">前台首页</a></li>
   </ul>
   <script>

	$(function(){
		//绑定事件
		bindEvent();
	})
	//绑定事件
	function bindEvent(){
		$("#btn_logout").bind("click",function(){
			//退出
			logout();
		})
	}
	//退出
	function logout(){
		$.ajax({
			url:"/user/logout",
			type:"post",
			success:function(result){
				if(result.code==0){
					layer.msg(result.msg,function(){
                        location.href='/'
                    });
				}else{
					layer.msg(result.msg);
				}
			}
		})
	}
</script>
</div>

    
